import 'package:base_lib/app.dart';
import 'package:base_lib/index.dart';
import 'package:doctor_login_lib/component.dart';
import 'package:doctor_user_lib/doctor_user_component.dart';
import 'package:flutter/material.dart';

class DoctorUserLib {
  static void doInit() {
    App.initializer([DoctorUserComponent(), DoctorLoginComponent()],
        DoctorLoginComponent.loginPage, "/setSettingPage");
  }

  static void initWithContext(BuildContext context) {
    ScreenAdapter.getInstance().init(context);
  }

  static void jump2Login(BuildContext context) {
    Routers.navigateTo(context, DoctorLoginComponent.loginPage);
  }

  static void jumpSetting(BuildContext context) {
    Routers.navigateTo(context, DoctorUserComponent.setSettingPage);
  }
}

class TipWrap extends StatelessWidget {
  final Widget child;

  TipWrap(this.child);

  @override
  Widget build(BuildContext context) {
    return OverlaySupport(
      child: child,
    );
  }
}
